<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="CarlHuang">
<title>人工干预审核</title>
<script language="javascript" src="../script/common.js"
	type="text/javascript"></script>
<script language="javascript" type="text/javascript"> 
	 var qt={};
    function load(){
     Common.initDict(viewdate.state, "change_state", "全部");
     Common.initDict(viewdate.perwork, "is_notice", "全部");
     Common.initDict(viewdate.operatetype, "operate_type", "全部");
     Common.initDict(viewdate3.check, "check_state");
     Eui.showNavigation();
     setPages(["listview","listview2","listview3"]);
	 createTable();
    }
		
    function showData1(){
     qt.showTable();
    }
     
	function createTable(){
	 var columns =[];
     columns[8]={title:"操作",width:"9%",align:"center",render:ckFunc,order:false};
     columns[9]={title:"操作",width:"9%",align:"center",render:chFunc,order:false};
	 qt = new QueryTable("grade_change_list2","viewdate","datalist",columns);
	}
		
	function ckFunc(v,r){
	    
	 return	"<a href=# onclick=\"chakan("+r[0]+",'"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[6]+"');return false;\">查看</a>"
    }
    
    function chFunc(v,r){
     if(r[6]=="等待审核")
	 return	"<a href=# onclick=\"check("+r[0]+",'"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[6]+"');return false;\">审核</a>"
	 else return "<a href=# ><font color=\"gray\">审核</font></a>"
	}
			
	function chakan(gradeid,cardid,pregrade,nextgrade,isnotice,operatetype,state){
	 $("viewdate2").gradeid.value=gradeid;
     $("cardid2").innerHTML =cardid;
	 $("state2").innerHTML =state;
	 $("currentGrade2").innerHTML =pregrade;
	 $("nextGrade2").innerHTML =nextgrade;
	 $("operateType2").innerHTML =operatetype;
	 $("isNotice2").innerHTML =isnotice;	  
	 switchPage('listview2');
    }
    
	function fanhui(){
	 switchPage('listview');
	}
					
	function check(gradeid,cardid,pregrade,nextgrade,isnotice,operatetype,state){  
	 $("viewdate3").gradeid.value=gradeid;
     $("cardid3").innerHTML =cardid;
	 $("state3").innerHTML =state;
	 $("currentGrade3").innerHTML =pregrade;
	 $("nextGrade3").innerHTML =nextgrade;
	 $("operateType3").innerHTML =operatetype;
     $("isNotice3").innerHTML =isnotice;
     switchPage('listview3');
	}
	
    function send(){	
	 var gradeid=$("viewdate3").gradeid.value;
     var gradestate=$("viewdate3").check.value;
     DWR.call('gradeService.gradeSend',gradeid,gradestate,function(v){
     createTable();
	 showData1();
	 switchPage('listview');
   	 });
	}
			
</script>
</head>	

<body onload="load()">
<!--页面导航-->
<div class=" nav "><div id="nav">&nbsp;</div></div>
<div id="content"><!--查询静态页面部分-->
<div id=listview>
<div class="formTitle">查 询</div>
<div class="form">
<form name="viewdate" id="viewdate">
<div class="searchForm">
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label6">
	<tr>
        <td><label>状态</label> <select name="state" ></select></td>
		<td><button type="button" onclick="showData1()">查  询</button></td>
	</tr>	
</table>
</div>
</form>
</div>
<div id="datalist"></div>
</div>

<div id="listview3" style="display:none;">
<div class="formTitle">审 核</div>
<div class="form">
<form name="viewdate3" id="viewdate3">
<div class="searchForm3">
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label6">
	 <input type="hidden" name="gradeid" id="gradeid" />	
	 <tr>
		<td><label>卡号</label> <span id="cardid3"></span></td>	
		<td><label>状态</label><span id="state3"></span></td>
		</tr>
		<tr>
		<td><label>当前级别&nbsp;&nbsp;</label><span id="currentGrade3"></span></td>
		<td><label>改变级别&nbsp;&nbsp;</label><span id="nextGrade3"></span></td>
	    </tr>
	  <tr>
		<td><label>操作类型&nbsp;&nbsp;</label><span id="operateType3"></span></td>
		<td><label>是否通知&nbsp;&nbsp;</label><span id="isNotice3"></span></td>
	   </tr>
	    <tr>
		<td><label>审 核</label><select name="check"></select></td>
		<td><button type="button" onclick="send()">提 交</button><button type="button" onclick="fanhui()">返 回</button></td>
	</tr>
</table>
</div>
</form>
</div>
<div id="datalist"></div>
</div>

<div id="listview2" style="display:none;">
<div class="formTitle">查 看</div>
<div class="form">
<form name="viewdate2" id="viewdate2">
<div class="searchForm2">
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label6">
	 <input type="hidden" name="gradeid" id="gradeid" />	
	 <tr>
		<td><label>卡号</label> <span id="cardid2"></span></td>
		<td><label>状态</label><span id="state2"></span></td>
		</tr>
		<tr>
		<td><label>当前级别&nbsp;&nbsp;</label><span id="currentGrade2"></span></td>
		<td><label>改变级别&nbsp;&nbsp;</label><span id="nextGrade2"></span></td>
	    </tr>
	  <tr>
		<td><label>操作类型&nbsp;&nbsp;</label><span id="operateType2"></span></td>
		<td><label>是否通知&nbsp;&nbsp;</label><span id="isNotice2"></span></td>
	   </tr>
	   <tr>
	   <td></td>
	   <td><button type="button" onclick="fanhui()">返 回</button></td>
	   </tr>
</table>
</div>
</form>
</div>
<div id="datalist"></div>
</div>

</body>
</html>